/* 
 * File:   vector3d.h
 * Author: chaterolas
 *
 * Created on 18 de junio de 2009, 11:10 PM
 */

#ifndef _VECTOR3D_H
#define	_VECTOR3D_H

#define EPSILON 0.001

class Vector3D {
public:
    Vector3D(double x = 0.0, double y = 0.0, double z = 0.0);
    Vector3D(const Vector3D& orig);
    virtual ~Vector3D();

    Vector3D *operator+(const Vector3D &v);
    void operator+=(const Vector3D &v);

    Vector3D *operator-(const Vector3D &v);
    void operator-=(const Vector3D &v);

    Vector3D *cross(const Vector3D &v);

    Vector3D *operator*(double f);
    void operator*=(double f);

    void setCoor(int ent, double val);
    double getCoor (int ent);

    Vector3D *getNormalized();
    void normalize();

    double dot(const Vector3D& v);
    double getNorm();

    int isNormalTo(const Vector3D& v);
    int isColinearTo(const Vector3D& v);

    double* coor;
};

#endif	/* _VECTOR3D_H */